using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;

namespace WFTest.Entity
{
    public partial class Model5 : DbContext
    {
        public Model5()
            : base("name=Model5")
        {
        }

        public virtual DbSet<T_STK_INVENTORYPRICE> T_STK_INVENTORYPRICE { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FID)
                .IsUnicode(false);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FYTPE)
                .IsUnicode(false);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FNUMBER)
                .IsUnicode(false);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FNAME)
                .IsUnicode(false);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FSPECIFICATION)
                .IsUnicode(false);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FORGNAME)
                .IsUnicode(false);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FSTOCKNAME)
                .IsUnicode(false);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FSYSCATEGORYNAME)
                .IsUnicode(false);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FDATE)
                .IsUnicode(false);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FSUMEQTY)
                .HasPrecision(38, 10);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FUNITNAME)
                .IsUnicode(false);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FBASEPRICE)
                .HasPrecision(38, 8);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FSUMPRICE)
                .HasPrecision(38, 6);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FBASEQTY_0to15)
                .HasPrecision(38, 10);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FBASEPRICE_0to15)
                .HasPrecision(38, 6);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FBASEQTY_15to30)
                .HasPrecision(38, 10);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FBASEPRICE_15to30)
                .HasPrecision(38, 6);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FBASEQTY_30to60)
                .HasPrecision(38, 10);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FBASEPRICE_30to60)
                .HasPrecision(38, 6);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FBASEQTY_60to90)
                .HasPrecision(38, 10);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FBASEPRICE_60to90)
                .HasPrecision(38, 6);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FBASEQTY_90to120)
                .HasPrecision(38, 10);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FBASEPRICE_90to120)
                .HasPrecision(38, 6);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FBASEQTY_120to180)
                .HasPrecision(38, 10);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FBASEPRICE_120to180)
                .HasPrecision(38, 6);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FBASEQTY_180to360)
                .HasPrecision(38, 10);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FBASEPRICE_180to360)
                .HasPrecision(38, 6);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FBASEQTY_360to)
                .HasPrecision(38, 10);

            modelBuilder.Entity<T_STK_INVENTORYPRICE>()
                .Property(e => e.FBASEPRICE_360to)
                .HasPrecision(38, 6);
        }
    }
}
